home *** CD-ROM | disk | FTP | other *** search
- Path: keats.ugrad.cs.ubc.ca!not-for-mail
- From: c2a192@ugrad.cs.ubc.ca (Kazimir Kylheku)
- Newsgroups: comp.lang.c
- Subject: Re: Can Windows DLL identify caller?
- Date: 25 Feb 1996 16:54:04 -0800
- Organization: Computer Science, University of B.C., Vancouver, B.C., Canada
- Message-ID: <4gr0bcINNjv2@keats.ugrad.cs.ubc.ca>
- References: <NEWTNews.825272087.8651.jbarrett@westridg.demon.co.uk>
- NNTP-Posting-Host: keats.ugrad.cs.ubc.ca
-
- In article <NEWTNews.825272087.8651.jbarrett@westridg.demon.co.uk>,
- Jon A Barrett <jbarrett@westridg.demon.co.uk> wrote:
- >
- >I've written a DLL in C that supplies 'secure' information to registered
- >programs. I have a relatively safe mechanism to ensure that the registered
- >programs have not been tampered with (checksums, image headers etc) but how
- >can I tell whose calling.
- >
- >Is there anyway that a DLL can identify something about the caller? Obviously
- >it will have to be something implicit, caller supplied parameters would be
- >open to abuse.
-
- Also, note well: A shared library (or DLL, if you will) cannot really be
- trusted to protect sensitive information. It is not a protection domain. To
- protect trusted information, you have to write a server which is accessed by
- message passing (e.g. internet datagrams), or put the information into your
- operating system kernel. Libraries that are mapped to the address space of the
- process usually do not offer adequate protection. For one thing, for the
- library to obtain the privileged information, it would have to somehow have a
- greater privilege than the client, so that it could then withhold the
- information from selected clients. But it cannot do this because it is not an
- autonomous service. It obtains its thread of control from the caller, and
- inherits privileges from the caller. It is, for all intents and purposes, a
- library and nothing more.
-
- >Any clues would be gratefully received.
-
- You definitely need to get some. The platform you are using may itself be
- inappropriate to what you are trying to do, as well as the overall approach.
- I can't tell---the term DLL is used not only under Windows but elsewhere.
- --
-
-